﻿<UserControl
    x:Class="Adaptive.ReactiveTrader.Client.UI.SpotTiles.SpotTileErrorView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:designer="using:Adaptive.ReactiveTrader.Client.UI.SpotTiles.Designer"
    mc:Ignorable="d"
    d:DesignHeight="150"
    d:DesignWidth="328"
    d:DataContext="{d:DesignInstance designer:DesignTimeSpotTileErrorViewModel, IsDesignTimeCreatable=True}">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Styles/Brushes.xaml" />
                <ResourceDictionary Source="/Styles/Button.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <Style TargetType="TextBlock" BasedOn="{StaticResource ReactiveTraderBaseTextBlockStyle}">
                <Setter Property="FontSize" Value="16" />
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <Border Padding="15,12" Background="{StaticResource ErrorBackgroundBrush}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <TextBlock Text="Error" Foreground="{StaticResource PrimaryForeground}" FontSize="18" />

                <TextBlock Text="{Binding ErrorMessage}" Foreground="#FFE8C0BB" TextWrapping="Wrap" FontSize="15" />
            </StackPanel>

            <Button Grid.Row="1" Content="Done" Command="{Binding DismissCommand, Mode=OneWay}" Foreground="#FFE8C0BB" Style="{StaticResource HyperlinkButtonStyle}" FontSize="16" HorizontalAlignment="Right" />
        </Grid>
    </Border>
</UserControl>